home *** CD-ROM | disk | FTP | other *** search
/ Imagine the Universe (9th Edition) / Imagine the Universe 9 - Disc 1.iso / pc / imagine / YBA / HTCas-size / javascript / time.js < prev   
Text File  |  2003-01-12  |  483b  |  25 lines

  1. size = "Blank";
  2.  
  3. function checkme() {
  4. size = document.time.answer.value - 0;
  5. if (!size) {size = "Blank";}
  6.  
  7. RightOnFile = './time-correct.html';
  8. TryAgainFile = './time-close.html';
  9. WayWrongFile = './time-wrong.html';
  10.  
  11. low_wrong = 912;
  12. hi_wrong  = 914;
  13. good = 913;
  14.  
  15. if ((size != "Blank") && (size == good)) {
  16.     location = RightOnFile;
  17. }
  18. else if ((size == "Blank") || ((size < low_wrong) || (size > hi_wrong))) {
  19.     location = WayWrongFile;
  20. }
  21. else {
  22.     location = TryAgainFile;
  23. }
  24. }
  25.